﻿using PRO.ORM;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace PRO.Entity
{
    [Entity(TableName = "Pro_Product")]
    public class ProductInfo : BaseEntity
    {
        private int _ID = 0;
        [EntityAttribute(SqlDbType = SqlDbType.Int, Len = 4, PrimaryKey = true)]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }
        private int _CID;
        /// <summary>
        /// 所属分类id
        /// </summary>
        [EntityAttribute(SqlDbType = SqlDbType.Int, Len = 4, DefaultValue = 0)]
        public int CID
        {
            get { return _CID; }
            set { _CID = value; }
        }

        private string _Title;
        /// <summary>
        /// 产品名称
        /// </summary>
        [EntityAttribute(SqlDbType = SqlDbType.NVarChar, Len = 100)]
        public string Title
        {
            get { return _Title; }
            set { _Title = value; }
        }

        private string _Des;
        /// <summary>
        /// 产品简介
        /// </summary>
        [EntityAttribute(SqlDbType = SqlDbType.NVarChar, Len = 500, NotNull = false)]
        public string Des
        {
            get { return _Des; }
            set { _Des = value; }
        }
        private string _Icon;
        /// <summary>
        /// 产品头图
        /// </summary>
        [EntityAttribute(SqlDbType = SqlDbType.NVarChar, Len = 200)]
        public string Icon
        {
            get { return _Icon; }
            set { _Icon = value; }
        }

        private string _Contents;
        /// <summary>
        /// 产品详细介绍
        /// </summary>
        [EntityAttribute(SqlDbType = SqlDbType.Text, Len = 0)]
        public string Contents
        {
            get { return _Contents; }
            set { _Contents = value; }
        }

        private decimal _Price;
        /// <summary>
        /// 出售价格
        /// </summary>
        [EntityAttribute(SqlDbType = SqlDbType.Decimal, Len = 18, DefaultValue = 0)]
        public decimal Price
        {
            get { return _Price; }
            set { _Price = value; }
        }

        private int _Sort;
        /// <summary>
        /// 排序序号
        /// </summary>
        [EntityAttribute(SqlDbType = SqlDbType.Int, Len = 4, DefaultValue = 0)]
        public int Sort
        {
            get { return _Sort; }
            set { _Sort = value; }
        }

        private bool _Show = false;
        /// <summary>
        /// 是否上架
        /// </summary>
        [EntityAttribute(SqlDbType = SqlDbType.Bit, Len = 1, DefaultValue = false)]
        public bool Show
        {
            get { return _Show; }
            set { _Show = value; }
        }
        private DateTime _EditTime;
        /// <summary>
        /// 编辑时间
        /// </summary>
        [EntityAttribute(SqlDbType = SqlDbType.DateTime, Len = 8, DefaultValue = "getDate()")]
        public DateTime EditTime
        {
            get { return _EditTime; }
            set { _EditTime = value; }
        }
    }
}
